package com.ygxsk.carhome.response;

import com.alibaba.fastjson.annotation.JSONField;

/*
 * @Author:itchenqi175@163.com
 * @Time:2023-07-04  11:20
 * @Description: 基础response类内容
 */
public class HttpEntityProperty<T> {

    /**
     * 返回码这是手机端和服务器端约定的，并不是http的
     */
    @JSONField(name = "code")
    private String code;

    /**
     * 错误或者其他携带信息
     */
    @JSONField(name = "message")
    private String message;

    /**
     * 具体数据
     */
    @JSONField(name = "data")
    private T data;

    //该项目的json是
    /*{
        "code": "20000",或者“20400”“20102”等等
            "data": [
        {
                "addressCommunityId": 0,
                "areaId": 48035,
                "buildingId": 0,
                "completeAddress": "河北保定市定州市杨家庄乡小陈村 村内第三家",
                "consigneeAddress": "村内第三家",
                "consigneeAddressId": 659,
                "consigneeAlias": "",
                "consigneeEmail": "",
                "consigneeMobile": "17531108969",
                "consigneeName": "陈正地",
                "consigneePhone": "",
                "createDate": "2019-08-22 11:29:44",
                "customerId": 19,
                "flagContractor": "",
                "houseCustomerId": 0,
                "houseId": 0,
                "isDefault": 0,
                "isDelete": 0,
                "postcode": "",
                "updateDate": "2019-08-22 11:29:44"
        }
    ],
        "message": "success"
    }*/

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data='" + data + '\'' +
                '}';
    }
}
